#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import template_blueprint
from api_1_0.templateResource.templateResource import TemplateResource
from api_1_0.templateResource.templateOtherResource import TemplateOtherResource

api = Api(template_blueprint)

api.add_resource(TemplateResource, '/template/<template_id>', '/template', endpoint='Template')

@template_blueprint.route('/add-ppt-template', methods=['POST'], endpoint='AddPptTemplate')
def add_template():
    return TemplateOtherResource.add_ppt_template()

@template_blueprint.route('/update-ppt-template', methods=['POST'], endpoint='UpdatePptTemplate')
def update_template():
    return TemplateOtherResource.update_ppt_template()

@template_blueprint.route('/look-ppt-template', methods=['GET'], endpoint='LookPptTemplate')
def look_template():
    return TemplateOtherResource.look_ppt_templates()

@template_blueprint.route('/get-ppt-template', methods=['GET'], endpoint='GetPptTemplate')
def get_template():
    return TemplateOtherResource.get_ppt_templates()

@template_blueprint.route('/delete-ppt-template', methods=['POST'], endpoint='DeletePptTemplate')
def delete_template():
    return TemplateResource.delete()